<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('交易日处理查询列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <p>交易日期：</p>
                                <input type="text" class="time-input" placeholder="交易日期" name="trDate"/>
                            </li>
                            <li>
                                <p>处理标识：</p>
                                <select name="processFlag" th:with="type=${@dict.getType('ds_tr_date_pro')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <p>处理状态：</p>
                                <select name="state" th:with="type=${@dict.getType('ds_tr_date_state')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" class="table-bordered table-hover table-striped"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('data:proc:edit')}]];
        var removeFlag = [[${@permission.hasPermi('data:proc:remove')}]];
        var processFlagDatas = [[${@dict.getType('ds_tr_date_pro')}]];
        var stateDatas = [[${@dict.getType('ds_tr_date_state')}]];
        var prefix = ctx + "data/proc";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "交易日处理查询",
                //启用跳转至指定页
                showPageGo: true,
                //启用点击选中行
                clickToSelect: true,
                columns: [
                {
                    field : 'trDate',
                    align : "center",
                    title : '交易日期'
                },
                {
                    field : 'processFlag',
                    align : "center",
                    title : '处理标识',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(processFlagDatas, value);
                    }
                },
                {
                    field : 'state',
                    align : "center",
                    title : '处理状态',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(stateDatas, value);
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>